package com.xdb.sqlparser.dialect.mysql.ast.statement;

import com.xdb.sqlparser.ast.AbstractSQLStatementImpl;
import com.xdb.sqlparser.dialect.mysql.visitor.MySqlASTVisitor;
import com.xdb.sqlparser.visitor.SQLAstVisitor;
import com.xdb.util.JDBCConstants;

public abstract class MySqlStatementImpl extends AbstractSQLStatementImpl implements MySqlStatement {

	public MySqlStatementImpl() {
		super(JDBCConstants.MYSQL);
	}

	@Override
	protected void accept0(SQLAstVisitor visitor) {
		if (visitor instanceof MySqlASTVisitor) {
			accept0((MySqlASTVisitor) visitor);
		} else {
			throw new IllegalArgumentException("not support visitor type : " + visitor.getClass().getName());
		}
	}

	public void accept0(MySqlASTVisitor visitor) {
		throw new UnsupportedOperationException(this.getClass().getName());
	}
}
